<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>Log4j2 中文文档 - Log4j2 2.x Manual | Docs4dev</title>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="Apache Log4j 2 是对Log4j的升级，它比其前身Log4j 1.x提供了重大改进，并提供了Logback中可用的许多改进，同时修复了Logback架构中的一些固有问题。">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta property="og:type" content="website">
<meta property="og:title" content="Log4j2 中文文档 - Log4j2 2.x Manual">
<meta property="og:url" content="https://www.docs4dev.com/docs/zh/log4j2/2.x/all/">
<meta property="og:site_name" content="Docs4dev">
<meta property="og:locale" content="zh_CN">
<meta name="twitter:card" content="Apache Log4j 2 是对Log4j的升级，它比其前身Log4j 1.x提供了重大改进，并提供了Logback中可用的许多改进，同时修复了Logback架构中的一些固有问题。">
<meta name="generator" content="Docs4dev template engine">
<link rel="stylesheet" href="static/css/app.min.css">
<link rel="shortcut icon" href="https://www.docs4dev.com/static/images/favicon.ico" type="image/x-icon">
<script async="" src="static/js/js.js"></script>
<script async="" src="static/js/adsbygoogle.js" crossorigin="anonymous"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
      dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'UA-129571937-1');
  </script>
<link rel="amphtml" href="https://www.docs4dev.com/amp/docs/zh/log4j2/2.x/all/index.html">

<script type="application/ld+json">{"name":null,"headline":"Log4j2 中文文档-Log4j2 2.x Manual","inLanguage":"zh-CN","version":"2.x","image":"/static/icon/icon-log4j2.png","datePublished":"2021-05-20T12:51:01Z","dateCreated":"2021-05-20T12:51:01Z","dateModified":"2021-07-07T12:38:40Z","@context":"https://schema.org/","@type":"APIReference","abstract":"Apache Log4j 2 是对Log4j的升级，它比其前身Log4j 1.x提供了重大改进，并提供了Logback中可用的许多改进，同时修复了Logback架构中的一些固有问题。"}</script>
</head>
<body>
<div class="book with-summary">
<div class="book-summary">
<div class="logo">
<a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all');" style="color: inherit;">
<img src="static/picture/icon-log4j2.png" style="width: 48px; height: 48px;" alt="Logo">
</a>
<b style="color: inherit; margin-left: 8px;">Log4j2 中文文档</b>
</div>
<div class="item">
<div>
<label for="version">版本</label>
<select id="version" onchange="onVersionChange(this)">
<option value="2.x" selected="selected">2.x</option>
</select>
</div>
<div style="margin-top: 8px;">
<label for="language">语言</label>
<select id="language" onchange="onLangChange(this)" value="zh">
<option value="en">English</option>
<option value="zh" selected="selected">中文</option>
</select>
</div>

</div>
<div class="item menus">
<a title="Table of Contents" style="margin-right: 8px;" href="#">
<i class="fa fa-chevron-left"></i>
<span style="margin-left: 2px;">返回目录</span>
</a>
</div>
<nav role="navigation" id="navigation">
<ul class="summary">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/index.html#');" title="Apache Log4j™2"> Apache Log4j™2 </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/index.html#');" title="About"> About </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/download.html');" title="Download"> Download </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/javadoc.html');" title="Javadoc"> Javadoc </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-api/apidocs/index.html');" title="Log4j 2 API"> Log4j 2 API </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-core/apidocs/index.html');" title="Implementation"> Implementation </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-taglib/apidocs/index.html');" title="JSP 标签库"> JSP 标签库 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-taglib/tlddoc/index.html');" title="JSP 标记库(TLD 文档)"> JSP 标记库(TLD 文档) </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html');" title="Maven，Ivy，GradleArtifact"> Maven，Ivy，GradleArtifact </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_Apache_Maven_build');" title="Maven"> Maven </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_Apache_Ivy_build');" title="Ivy"> Ivy </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_Gradle_build');" title="Gradle"> Gradle </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_SBT_build');" title="SBT"> SBT </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Bill_of_Material');" title="物料 Lists"> 物料 Lists </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Optional_Components');" title="Optional Components"> Optional Components </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Snapshot_builds');" title="Snapshot builds"> Snapshot builds </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/runtime-dependencies.html');" title="Runtime Dependencies"> Runtime Dependencies </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/changelog.html');" title="Changelog"> Changelog </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/faq.html');" title="FAQ"> FAQ </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html');" title="Performance"> Performance </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#benchmarks');" title="Benchmarks"> Benchmarks </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#loglibComparison');" title="日志库比较"> 日志库比较 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLogging');" title="异步日志比较"> 异步日志比较 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLoggingResponseTime');" title="异步记录延迟"> 异步记录延迟 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLoggingWithParams');" title="Parameters"> Parameters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLoggingWithLocation');" title="Location"> Location </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#fileLoggingComparison');" title="文件记录比较"> 文件记录比较 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#filtering');" title="Filtering Comparison"> Filtering Comparison </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#tradeoffs');" title="Trade-offs"> Trade-offs </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/articles.html');" title="文章和教程"> 文章和教程 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/security.html');" title="Security"> Security </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/support.html');" title="Support"> Support </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/thanks.html');" title="Thanks"> Thanks </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/build.html');" title="For Contributors"> For Contributors </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/build.html');" title="从源代码构建 Log4j"> 从源代码构建 Log4j </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/guidelines.html');" title="Guidelines"> Guidelines </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/javastyle.html');" title="Style Guide"> Style Guide </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-index.html');" title="Manual"> Manual </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-index.html');" title="Introduction"> Introduction </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-architecture.html');" title="Architecture"> Architecture </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-compatibility.html');" title="Log4j 1.x 兼容性"> Log4j 1.x 兼容性 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-migration.html');" title="Log4j 1.x 迁移"> Log4j 1.x 迁移 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-api.html');" title="Java API"> Java API </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-logbuilder.html');" title="Log Builder"> Log Builder </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-flowtracing.html');" title="Flow Tracing"> Flow Tracing </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-markers.html');" title="Markers"> Markers </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-eventlogging.html');" title="Event Logging"> Event Logging </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-messages.html');" title="Messages"> Messages </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-thread-context.html');" title="ThreadContext"> ThreadContext </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-scala-api.html');" title="Scala API"> Scala API </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html');" title="Configuration"> Configuration </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#AutomaticConfiguration');" title="Automatic Configuration"> Automatic Configuration </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Additivity');" title="Additivity"> Additivity </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#AutomaticReconfiguration');" title="Automatic Reconfiguration"> Automatic Reconfiguration </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#ChainsawSupport');" title="Chainsaw Support"> Chainsaw Support </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#ConfigurationSyntax');" title="Configuration Syntax"> Configuration Syntax </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#XML');" title="XML Syntax"> XML Syntax </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#JSON');" title="JSON Syntax"> JSON Syntax </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#YAML');" title="YAML Syntax"> YAML Syntax </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Properties');" title="Properties Syntax"> Properties Syntax </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Loggers');" title="Configuring Loggers"> Configuring Loggers </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Appenders');" title="Configuring Appenders"> Configuring Appenders </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Filters');" title="Configuring Filters"> Configuring Filters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#PropertySubstitution');" title="Property Substitution"> Property Substitution </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#RuntimeLookup');" title="Lookup Variables"> Lookup Variables </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Scripts');" title="Scripts"> Scripts </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#XInclude');" title="XInclude"> XInclude </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#CompositeConfiguration');" title="Composite Configurations"> Composite Configurations </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#StatusMessages');" title="Status Messages"> Status Messages </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#UnitTestingInMaven');" title="Maven 中的单元测试"> Maven 中的单元测试 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#SystemProperties');" title="System Properties"> System Properties </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-usage.html');" title="Usage"> Usage </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-usage.html#StaticVsNonStatic');" title="静态与非静态 Logger"> 静态与非静态 Logger </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-usage.html#LoggerVsClass');" title="Logger 名称与类名称"> Logger 名称与类名称 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-cloud.html');" title="登录云"> 登录云 </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html');" title="Web 应用程序和 JSP"> Web 应用程序和 JSP </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#Servlet-3.0');" title="Servlet 3.0 及更高版本"> Servlet 3.0 及更高版本 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#Servlet-2.5');" title="Servlet 2.5"> Servlet 2.5 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#ContextParams');" title="Context Parameters"> Context Parameters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#WebLookup');" title="Configuration Lookups"> Configuration Lookups </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#JspLogging');" title="JavaServer 页面记录"> JavaServer 页面记录 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#Async');" title="Asynchronous Requests"> Asynchronous Requests </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html');" title="Lookups"> Lookups </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#ContextMapLookup');" title="Context Map"> Context Map </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#DateLookup');" title="Date"> Date </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#DockerLookup');" title="Docker"> Docker </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#EnvironmentLookup');" title="Environment"> Environment </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#EventLookup');" title="Event"> Event </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#JavaLookup');" title="Java"> Java </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#JndiLookup');" title="JNDI"> JNDI </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#JmxRuntimeInputArgumentsLookup');" title="JVM Arguments"> JVM Arguments </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#KubernetesLookup');" title="Kubernetes"> Kubernetes </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#Log4jConfigLookup');" title="Log4j Config"> Log4j Config </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#LowerLookup');" title="Lower"> Lower </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#AppMainArgsLookup');" title="Main Arguments"> Main Arguments </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#MapLookup');" title="Map"> Map </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#SpringLookup');" title="Spring"> Spring </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#StructuredDataLookup');" title="Structured Data"> Structured Data </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#SystemPropertiesLookup');" title="System Properties"> System Properties </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#UpperLookup');" title="Upper"> Upper </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#WebLookup');" title="Web"> Web </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html');" title="Appenders"> Appenders </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#AsyncAppender');" title="Async"> Async </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#CassandraAppender');" title="Cassandra"> Cassandra </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#ConsoleAppender');" title="Console"> Console </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#FailoverAppender');" title="Failover"> Failover </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#FileAppender');" title="File"> File </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#FlumeAppender');" title="Flume"> Flume </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JDBCAppender');" title="JDBC"> JDBC </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JMSAppender');" title="JMS"> JMS </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JPAAppender');" title="JPA"> JPA </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#HttpAppender');" title="HTTP"> HTTP </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#KafkaAppender');" title="Kafka"> Kafka </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#MemoryMappedFileAppender');" title="内存 Map 文件"> 内存 Map 文件 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppender');" title="NoSQL"> NoSQL </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderMongoDB');" title="适用于 MongoDB 的 NoSQL"> 适用于 MongoDB 的 NoSQL </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderMongoDB2');" title="适用于 MongoDB 2 的 NoSQL"> 适用于 MongoDB 2 的 NoSQL </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderMongoDB3');" title="适用于 MongoDB 3 的 NoSQL"> 适用于 MongoDB 3 的 NoSQL </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderCouchDB');" title="NoSQL for CouchDB"> NoSQL for CouchDB </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#OutputStreamAppender');" title="Output Stream"> Output Stream </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RandomAccessFileAppender');" title="随机存取 Files"> 随机存取 Files </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RewriteAppender');" title="Rewrite"> Rewrite </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RollingFileAppender');" title="Rolling File"> Rolling File </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RollingRandomAccessFileAppender');" title="滚动随机访问文件"> 滚动随机访问文件 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RoutingAppender');" title="Routing"> Routing </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SMTPAppender');" title="SMTP"> SMTP </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#ScriptAppenderSelector');" title="ScriptAppenderSelector"> ScriptAppenderSelector </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SocketAppender');" title="Socket"> Socket </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SSL');" title="SSL"> SSL </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SyslogAppender');" title="Syslog"> Syslog </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JeroMQAppender');" title="ZeroMQ/JeroMQ"> ZeroMQ/JeroMQ </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html');" title="Layouts"> Layouts </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#CSVLayouts');" title="CSV"> CSV </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#GELFLayout');" title="GELF"> GELF </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#HTMLLayout');" title="HTML"> HTML </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#JSONLayout');" title="JSON"> JSON </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#PatternLayout');" title="Pattern"> Pattern </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#RFC5424Layout');" title="RFC-5424"> RFC-5424 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#SerializedLayout');" title="Serialized"> Serialized </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#SyslogLayout');" title="Syslog"> Syslog </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#XMLLayout');" title="XML"> XML </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#YamlLayout');" title="YAML"> YAML </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#LocationInformation');" title="Location Information"> Location Information </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html');" title="Filters"> Filters </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#BurstFilter');" title="Burst"> Burst </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#CompositeFilter');" title="Composite Filter"> Composite Filter </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#DynamicThresholdFilter');" title="Dynamic Threshold"> Dynamic Threshold </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#MapFilter');" title="Map"> Map </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#MarkerFilter');" title="Marker"> Marker </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#RegexFilter');" title="Regex"> Regex </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#Script');" title="Script"> Script </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#StructuredDataFilter');" title="Structured Data"> Structured Data </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#ThreadContextMapFilter');" title="线程上下文 Map"> 线程上下文 Map </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#ThresholdFilter');" title="Threshold"> Threshold </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#TimeFilter');" title="Time"> Time </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html');" title="Async Loggers"> Async Loggers </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#Trade-offs');" title="Trade-offs"> Trade-offs </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#AllAsync');" title="所有 Logger 异步"> 所有 Logger 异步 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#MixedSync-Async');" title="混 Contract 步和异步"> 混 Contract 步和异步 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#Location');" title="Location"> Location </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#Performance');" title="Performance"> Performance </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#UnderTheHood');" title="Under The Hood"> Under The Hood </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html');" title="Garbage-free Logging"> Garbage-free Logging </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Config');" title="Configuration"> Configuration </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Appenders');" title="Supported Appenders"> Supported Appenders </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Layouts');" title="Supported Layouts"> Supported Layouts </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Filters');" title="Supported Filters"> Supported Filters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#api');" title="API Changes"> API Changes </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#codeImpact');" title="对应用程序代码的影响"> 对应用程序代码的影响 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Performance');" title="Performance"> Performance </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#UnderTheHood');" title="Under The Hood"> Under The Hood </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-jmx.html');" title="JMX"> JMX </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-logsep.html');" title="Logging Separation"> Logging Separation </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html');" title="Extending Log4j"> Extending Log4j </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#LoggerContextFactory');" title="LoggerContextFactory"> LoggerContextFactory </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#ContextSelector');" title="ContextSelector"> ContextSelector </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#ConfigurationFactory');" title="ConfigurationFactory"> ConfigurationFactory </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#LoggerConfig');" title="LoggerConfig"> LoggerConfig </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#LogEventFactory');" title="LogEventFactory"> LogEventFactory </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#MessageFactory');" title="MessageFactory"> MessageFactory </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Lookups');" title="Lookups"> Lookups </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Filters');" title="Filters"> Filters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Appenders');" title="Appenders"> Appenders </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Layouts');" title="Layouts"> Layouts </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#PatternConverters');" title="PatternConverters"> PatternConverters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Plugin_Builders');" title="Plugin Builders"> Plugin Builders </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#ContextDataProvider');" title="Custom ContextDataProvider"> Custom ContextDataProvider </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Custom_Plugins');" title="Custom Plugins"> Custom Plugins </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html');" title="Plugins"> Plugins </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#Core');" title="Core"> Core </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#Converters');" title="Converters"> Converters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#KeyProviders');" title="Key Providers"> Key Providers </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#Lookups');" title="Lookups"> Lookups </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#TypeConverters');" title="Type Converters"> Type Converters </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#DeveloperNotes');" title="Developer Notes"> Developer Notes </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html');" title="编程 Log4j 配置"> 编程 Log4j 配置 </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#ConfigurationBuilder');" title="ConfigurationBuilder API"> ConfigurationBuilder API </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#ConfigurationFactory');" title="Understanding ConfigurationFactory"> Understanding ConfigurationFactory </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#Example');" title="Example"> Example </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#Configurator');" title="Using Configurator"> Using Configurator </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#Hybrid');" title="配置文件和代码"> 配置文件和代码 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#AddingToCurrent');" title="After Initialization"> After Initialization </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#AppendingToWritersAndOutputStreams');" title="追加到 Writer 和输出流"> 追加到 Writer 和输出流 </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html');" title="自定义日志级别"> 自定义日志级别 </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#DefiningLevelsInCode');" title="In Code"> In Code </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#DefiningLevelsInConfiguration');" title="In Configuration"> In Configuration </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#AddingOrReplacingLevels');" title="添加或替换级别"> 添加或替换级别 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#CustomLoggers');" title="Custom Loggers"> Custom Loggers </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#ExampleUsage');" title="自定义 Logger 示例"> 自定义 Logger 示例 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#CodeGen');" title="代码生成工具"> 代码生成工具 </a> </li>
</ul> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/scala/index.html');" title="Related Projects"> Related Projects </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/scala/index.html');" title="Log4j-Scala"> Log4j-Scala </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/1.2/');" title="Legacy Sites"> Legacy Sites </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/1.2/');" title="Log4j 1.2-寿命终止"> Log4j 1.2-寿命终止 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/log4j-2.3/');" title="Log4j 2.3-Java 6"> Log4j 2.3-Java 6 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/log4j-2.12.1');" title="Log4j 2.12.1-Java 7"> Log4j 2.12.1-Java 7 </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-api/index.html');" title="Components"> Components </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-api/index.html');" title="API"> API </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-core-index.html');" title="Implementation"> Implementation </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jcl-index.html');" title="公用伐木 bridge"> 公用伐木 bridge </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-1.2-api-index.html');" title="Log4j 1.2 API"> Log4j 1.2 API </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-slf4j-impl-index.html');" title="SLF4J Binding"> SLF4J Binding </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jul-index.html');" title="JUL Adapter"> JUL Adapter </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jpl-index.html');" title="JDK 平台 Logger"> JDK 平台 Logger </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-to-slf4j-index.html');" title="Log4j 2 到 SLF4J 适配器"> Log4j 2 到 SLF4J 适配器 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-flume-ng-index.html');" title="Apache Flume Appender"> Apache Flume Appender </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-taglib/index.html');" title="Log4j 标签库"> Log4j 标签库 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jmx-gui-index.html');" title="Log4j JMX GUI"> Log4j JMX GUI </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-web-index.html');" title="Log4j Web 应用程序支持"> Log4j Web 应用程序支持 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-appserver-index.html');" title="Log4j 应用服务器集成"> Log4j 应用服务器集成 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-couchdb-index.html');" title="Log4j CouchDB 附加器"> Log4j CouchDB 附加器 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-mongodb2-index.html');" title="Log4j MongoDB2 附加器"> Log4j MongoDB2 附加器 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-mongodb3-index.html');" title="Log4j MongoDB3 附加程序"> Log4j MongoDB3 附加程序 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-cassandra-index.html');" title="Log4j Cassandra 附加器"> Log4j Cassandra 附加器 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-iostreams-index.html');" title="Log4j IO 流"> Log4j IO 流 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-liquibase-index.html');" title="Log4j Liquibase 绑定"> Log4j Liquibase 绑定 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-docker-index.html');" title="Log4j Docker 支持"> Log4j Docker 支持 </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-spring-cloud-config-log4j-spring-cloud-config-client-index.html');" title="Log4j Spring Cloud ConfigClient 端"> Log4j Spring Cloud ConfigClient 端 </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/dependency-convergence.html');" title="Project Information"> Project Information </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/dependency-convergence.html');" title="Dependency Convergence"> Dependency Convergence </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/dependency-management.html');" title="Dependency Management"> Dependency Management </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/team-list.html');" title="Project Team"> Project Team </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/mail-lists.html');" title="Mailing Lists"> Mailing Lists </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/issue-tracking.html');" title="Issue Tracking"> Issue Tracking </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/license.html');" title="Project License"> Project License </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/source-repository.html');" title="Source Repository"> Source Repository </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/project-summary.html');" title="Project Summary"> Project Summary </a> </li>
</ul> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/changes-report.html');" title="Project Reports"> Project Reports </a>
<ul class="articles">
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/changes-report.html');" title="Changes Report"> Changes Report </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/jira-report.html');" title="JIRA Report"> JIRA Report </a> </li>
<li class="chapter"> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/rat-report.html');" title="RAT Report"> RAT Report </a> </li>
</ul> </li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<header class="book-header">
<div class="dropdown pull-right js-toolbar-action">
<a class="btn toggle-dropdown" aria-label="Language" href="#">
<i class="fa fa-globe"></i>
</a>
<div class="dropdown-menu dropdown-left">
<div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div>
<div class="buttons">
<button class="button size-1" onclick="changeLang('zh_CN')">中文</button>
</div>
<div class="buttons">
<button class="button size-1" onclick="changeLang('en_US')">English</button>
</div>
</div>
</div>
<a class="btn pull-right js-toolbar-action non-mobile" aria-label="Sign up" href="register.html">
<i class="fa fa-sign-in"></i> <span>注册</span>
</a>
<a class="btn pull-right js-toolbar-action non-mobile" aria-label="Sign in" href="register.html">
<i class="fa fa-sign-in"></i>
<span>登录</span>
</a>
<a class="btn pull-left js-toolbar-action btn-summary" href="#"><i class="fa fa-align-justify"></i></a>
<div class="dropdown pull-left font-settings js-toolbar-action">
<a class="btn toggle-dropdown" aria-label="Font Settings" href="#">
<i class="fa fa-font"></i>
</a>
<div class="dropdown-menu dropdown-right">
<div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div>
<div class="buttons">
<button class="button size-2 font-reduce">A</button>
<button class="button size-2 font-enlarge">A</button>
</div>
<div class="buttons">
<button class="button size-2 family-serif">Serif</button>
<button class="button size-2 family-sans">Sans</button>
</div>
<div class="buttons">
<button class="button size-3 theme-white">White</button>
<button class="button size-3 theme-sepia">Sepia</button>
<button class="button size-3 theme-night">Night</button>
</div>
</div>
</div>
<a class="btn pull-left js-toolbar-action non-mobile" aria-label="Home" href="zh.html">
<i class="fa fa-home"></i> <span>首页</span>
</a>
<a class="btn pull-left js-toolbar-action non-mobile" aria-label="Guide" href="javascript:window.open('https://www.javadoc.org/');">
<i class="fa fa-book"></i> <span>API Docs</span>
</a>
<a class="btn pull-left js-toolbar-action non-mobile" aria-label="Tools" href="index1.html">
<i class="fa fa-gears"></i> <span>工具</span>
</a>
<div class="dropdown pull-left js-toolbar-action mobile">
<a class="btn toggle-dropdown" aria-label="Language" href="#">
<i class="fa fa-chevron-down"></i>
</a>
<div class="dropdown-menu dropdown-right">
<div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div>
<div class="buttons">
<a class="button size-1" aria-label="Home" href="zh.html">
<i class="fa fa-home"></i> <span>首页</span>
</a>
</div>
<div class="buttons">
<a class="button size-1" aria-label="Guide" href="javascript:window.open('https://www.javadoc.org/');">
<i class="fa fa-book"></i> <span>API Docs</span>
</a>
</div>
<div class="buttons">
<a class="button size-1" aria-label="Tools" href="index1.html">
<i class="fa fa-gears"></i> <span>工具</span>
</a>
</div>
</div>
</div>
<div id="autocomplete" class="pull-right"></div>
<span id="toolbar-title"></span>
</header>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal markdown-section">
<div id="content">
<h1>Log4j2 2.x Manual</h1>
<div><ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-6108808167664152" data-ad-slot="6964403648"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
<div><div class="divider">
<span class="divider-inner-text">Table of Contents</span>
</div>
<ul class="toc">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/index.html#');" title="Apache Log4j™2"> Apache Log4j™2 </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/index.html#');" title="About"> About </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/download.html');" title="Download"> Download </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/javadoc.html');" title="Javadoc"> Javadoc </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-api/apidocs/index.html');" title="Log4j 2 API"> Log4j 2 API </a> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-core/apidocs/index.html');" title="Implementation"> Implementation </a> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-taglib/apidocs/index.html');" title="JSP 标签库"> JSP 标签库 </a> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-taglib/tlddoc/index.html');" title="JSP 标记库(TLD 文档)"> JSP 标记库(TLD 文档) </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html');" title="Maven，Ivy，GradleArtifact"> Maven，Ivy，GradleArtifact </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_Apache_Maven_build');" title="Maven"> Maven </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_Apache_Ivy_build');" title="Ivy"> Ivy </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_Gradle_build');" title="Gradle"> Gradle </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Using_Log4j_in_your_SBT_build');" title="SBT"> SBT </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Bill_of_Material');" title="物料 Lists"> 物料 Lists </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Optional_Components');" title="Optional Components"> Optional Components </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/maven-artifacts.html#Snapshot_builds');" title="Snapshot builds"> Snapshot builds </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/runtime-dependencies.html');" title="Runtime Dependencies"> Runtime Dependencies </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/changelog.html');" title="Changelog"> Changelog </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/faq.html');" title="FAQ"> FAQ </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html');" title="Performance"> Performance </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#benchmarks');" title="Benchmarks"> Benchmarks </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#loglibComparison');" title="日志库比较"> 日志库比较 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLogging');" title="异步日志比较"> 异步日志比较 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLoggingResponseTime');" title="异步记录延迟"> 异步记录延迟 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLoggingWithParams');" title="Parameters"> Parameters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#asyncLoggingWithLocation');" title="Location"> Location </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#fileLoggingComparison');" title="文件记录比较"> 文件记录比较 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#filtering');" title="Filtering Comparison"> Filtering Comparison </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/performance.html#tradeoffs');" title="Trade-offs"> Trade-offs </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/articles.html');" title="文章和教程"> 文章和教程 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/security.html');" title="Security"> Security </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/support.html');" title="Support"> Support </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/thanks.html');" title="Thanks"> Thanks </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/build.html');" title="For Contributors"> For Contributors </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/build.html');" title="从源代码构建 Log4j"> 从源代码构建 Log4j </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/guidelines.html');" title="Guidelines"> Guidelines </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/javastyle.html');" title="Style Guide"> Style Guide </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-index.html');" title="Manual"> Manual </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-index.html');" title="Introduction"> Introduction </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-architecture.html');" title="Architecture"> Architecture </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-compatibility.html');" title="Log4j 1.x 兼容性"> Log4j 1.x 兼容性 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-migration.html');" title="Log4j 1.x 迁移"> Log4j 1.x 迁移 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-api.html');" title="Java API"> Java API </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-logbuilder.html');" title="Log Builder"> Log Builder </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-flowtracing.html');" title="Flow Tracing"> Flow Tracing </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-markers.html');" title="Markers"> Markers </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-eventlogging.html');" title="Event Logging"> Event Logging </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-messages.html');" title="Messages"> Messages </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-thread-context.html');" title="ThreadContext"> ThreadContext </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-scala-api.html');" title="Scala API"> Scala API </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html');" title="Configuration"> Configuration </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#AutomaticConfiguration');" title="Automatic Configuration"> Automatic Configuration </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Additivity');" title="Additivity"> Additivity </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#AutomaticReconfiguration');" title="Automatic Reconfiguration"> Automatic Reconfiguration </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#ChainsawSupport');" title="Chainsaw Support"> Chainsaw Support </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#ConfigurationSyntax');" title="Configuration Syntax"> Configuration Syntax </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#XML');" title="XML Syntax"> XML Syntax </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#JSON');" title="JSON Syntax"> JSON Syntax </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#YAML');" title="YAML Syntax"> YAML Syntax </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Properties');" title="Properties Syntax"> Properties Syntax </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Loggers');" title="Configuring Loggers"> Configuring Loggers </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Appenders');" title="Configuring Appenders"> Configuring Appenders </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Filters');" title="Configuring Filters"> Configuring Filters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#PropertySubstitution');" title="Property Substitution"> Property Substitution </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#RuntimeLookup');" title="Lookup Variables"> Lookup Variables </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#Scripts');" title="Scripts"> Scripts </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#XInclude');" title="XInclude"> XInclude </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#CompositeConfiguration');" title="Composite Configurations"> Composite Configurations </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#StatusMessages');" title="Status Messages"> Status Messages </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#UnitTestingInMaven');" title="Maven 中的单元测试"> Maven 中的单元测试 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-configuration.html#SystemProperties');" title="System Properties"> System Properties </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-usage.html');" title="Usage"> Usage </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-usage.html#StaticVsNonStatic');" title="静态与非静态 Logger"> 静态与非静态 Logger </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-usage.html#LoggerVsClass');" title="Logger 名称与类名称"> Logger 名称与类名称 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-cloud.html');" title="登录云"> 登录云 </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html');" title="Web 应用程序和 JSP"> Web 应用程序和 JSP </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#Servlet-3.0');" title="Servlet 3.0 及更高版本"> Servlet 3.0 及更高版本 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#Servlet-2.5');" title="Servlet 2.5"> Servlet 2.5 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#ContextParams');" title="Context Parameters"> Context Parameters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#WebLookup');" title="Configuration Lookups"> Configuration Lookups </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#JspLogging');" title="JavaServer 页面记录"> JavaServer 页面记录 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-webapp.html#Async');" title="Asynchronous Requests"> Asynchronous Requests </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html');" title="Lookups"> Lookups </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#ContextMapLookup');" title="Context Map"> Context Map </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#DateLookup');" title="Date"> Date </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#DockerLookup');" title="Docker"> Docker </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#EnvironmentLookup');" title="Environment"> Environment </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#EventLookup');" title="Event"> Event </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#JavaLookup');" title="Java"> Java </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#JndiLookup');" title="JNDI"> JNDI </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#JmxRuntimeInputArgumentsLookup');" title="JVM Arguments"> JVM Arguments </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#KubernetesLookup');" title="Kubernetes"> Kubernetes </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#Log4jConfigLookup');" title="Log4j Config"> Log4j Config </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#LowerLookup');" title="Lower"> Lower </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#AppMainArgsLookup');" title="Main Arguments"> Main Arguments </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#MapLookup');" title="Map"> Map </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#SpringLookup');" title="Spring"> Spring </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#StructuredDataLookup');" title="Structured Data"> Structured Data </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#SystemPropertiesLookup');" title="System Properties"> System Properties </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#UpperLookup');" title="Upper"> Upper </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html#WebLookup');" title="Web"> Web </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html');" title="Appenders"> Appenders </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#AsyncAppender');" title="Async"> Async </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#CassandraAppender');" title="Cassandra"> Cassandra </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#ConsoleAppender');" title="Console"> Console </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#FailoverAppender');" title="Failover"> Failover </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#FileAppender');" title="File"> File </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#FlumeAppender');" title="Flume"> Flume </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JDBCAppender');" title="JDBC"> JDBC </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JMSAppender');" title="JMS"> JMS </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JPAAppender');" title="JPA"> JPA </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#HttpAppender');" title="HTTP"> HTTP </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#KafkaAppender');" title="Kafka"> Kafka </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#MemoryMappedFileAppender');" title="内存 Map 文件"> 内存 Map 文件 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppender');" title="NoSQL"> NoSQL </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderMongoDB');" title="适用于 MongoDB 的 NoSQL"> 适用于 MongoDB 的 NoSQL </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderMongoDB2');" title="适用于 MongoDB 2 的 NoSQL"> 适用于 MongoDB 2 的 NoSQL </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderMongoDB3');" title="适用于 MongoDB 3 的 NoSQL"> 适用于 MongoDB 3 的 NoSQL </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#NoSQLAppenderCouchDB');" title="NoSQL for CouchDB"> NoSQL for CouchDB </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#OutputStreamAppender');" title="Output Stream"> Output Stream </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RandomAccessFileAppender');" title="随机存取 Files"> 随机存取 Files </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RewriteAppender');" title="Rewrite"> Rewrite </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RollingFileAppender');" title="Rolling File"> Rolling File </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RollingRandomAccessFileAppender');" title="滚动随机访问文件"> 滚动随机访问文件 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#RoutingAppender');" title="Routing"> Routing </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SMTPAppender');" title="SMTP"> SMTP </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#ScriptAppenderSelector');" title="ScriptAppenderSelector"> ScriptAppenderSelector </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SocketAppender');" title="Socket"> Socket </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SSL');" title="SSL"> SSL </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#SyslogAppender');" title="Syslog"> Syslog </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-appenders.html#JeroMQAppender');" title="ZeroMQ/JeroMQ"> ZeroMQ/JeroMQ </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html');" title="Layouts"> Layouts </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#CSVLayouts');" title="CSV"> CSV </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#GELFLayout');" title="GELF"> GELF </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#HTMLLayout');" title="HTML"> HTML </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#JSONLayout');" title="JSON"> JSON </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#PatternLayout');" title="Pattern"> Pattern </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#RFC5424Layout');" title="RFC-5424"> RFC-5424 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#SerializedLayout');" title="Serialized"> Serialized </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#SyslogLayout');" title="Syslog"> Syslog </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#XMLLayout');" title="XML"> XML </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#YamlLayout');" title="YAML"> YAML </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-layouts.html#LocationInformation');" title="Location Information"> Location Information </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html');" title="Filters"> Filters </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#BurstFilter');" title="Burst"> Burst </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#CompositeFilter');" title="Composite Filter"> Composite Filter </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#DynamicThresholdFilter');" title="Dynamic Threshold"> Dynamic Threshold </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#MapFilter');" title="Map"> Map </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#MarkerFilter');" title="Marker"> Marker </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#RegexFilter');" title="Regex"> Regex </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#Script');" title="Script"> Script </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#StructuredDataFilter');" title="Structured Data"> Structured Data </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#ThreadContextMapFilter');" title="线程上下文 Map"> 线程上下文 Map </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#ThresholdFilter');" title="Threshold"> Threshold </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-filters.html#TimeFilter');" title="Time"> Time </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html');" title="Async Loggers"> Async Loggers </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#Trade-offs');" title="Trade-offs"> Trade-offs </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#AllAsync');" title="所有 Logger 异步"> 所有 Logger 异步 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#MixedSync-Async');" title="混 Contract 步和异步"> 混 Contract 步和异步 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#Location');" title="Location"> Location </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#Performance');" title="Performance"> Performance </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-async.html#UnderTheHood');" title="Under The Hood"> Under The Hood </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html');" title="Garbage-free Logging"> Garbage-free Logging </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Config');" title="Configuration"> Configuration </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Appenders');" title="Supported Appenders"> Supported Appenders </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Layouts');" title="Supported Layouts"> Supported Layouts </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Filters');" title="Supported Filters"> Supported Filters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#api');" title="API Changes"> API Changes </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#codeImpact');" title="对应用程序代码的影响"> 对应用程序代码的影响 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#Performance');" title="Performance"> Performance </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-garbagefree.html#UnderTheHood');" title="Under The Hood"> Under The Hood </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-jmx.html');" title="JMX"> JMX </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-logsep.html');" title="Logging Separation"> Logging Separation </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html');" title="Extending Log4j"> Extending Log4j </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#LoggerContextFactory');" title="LoggerContextFactory"> LoggerContextFactory </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#ContextSelector');" title="ContextSelector"> ContextSelector </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#ConfigurationFactory');" title="ConfigurationFactory"> ConfigurationFactory </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#LoggerConfig');" title="LoggerConfig"> LoggerConfig </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#LogEventFactory');" title="LogEventFactory"> LogEventFactory </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#MessageFactory');" title="MessageFactory"> MessageFactory </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Lookups');" title="Lookups"> Lookups </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Filters');" title="Filters"> Filters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Appenders');" title="Appenders"> Appenders </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Layouts');" title="Layouts"> Layouts </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#PatternConverters');" title="PatternConverters"> PatternConverters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Plugin_Builders');" title="Plugin Builders"> Plugin Builders </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#ContextDataProvider');" title="Custom ContextDataProvider"> Custom ContextDataProvider </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-extending.html#Custom_Plugins');" title="Custom Plugins"> Custom Plugins </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html');" title="Plugins"> Plugins </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#Core');" title="Core"> Core </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#Converters');" title="Converters"> Converters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#KeyProviders');" title="Key Providers"> Key Providers </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#Lookups');" title="Lookups"> Lookups </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#TypeConverters');" title="Type Converters"> Type Converters </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-plugins.html#DeveloperNotes');" title="Developer Notes"> Developer Notes </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html');" title="编程 Log4j 配置"> 编程 Log4j 配置 </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#ConfigurationBuilder');" title="ConfigurationBuilder API"> ConfigurationBuilder API </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#ConfigurationFactory');" title="Understanding ConfigurationFactory"> Understanding ConfigurationFactory </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#Example');" title="Example"> Example </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#Configurator');" title="Using Configurator"> Using Configurator </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#Hybrid');" title="配置文件和代码"> 配置文件和代码 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#AddingToCurrent');" title="After Initialization"> After Initialization </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customconfig.html#AppendingToWritersAndOutputStreams');" title="追加到 Writer 和输出流"> 追加到 Writer 和输出流 </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html');" title="自定义日志级别"> 自定义日志级别 </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#DefiningLevelsInCode');" title="In Code"> In Code </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#DefiningLevelsInConfiguration');" title="In Configuration"> In Configuration </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#AddingOrReplacingLevels');" title="添加或替换级别"> 添加或替换级别 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#CustomLoggers');" title="Custom Loggers"> Custom Loggers </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#ExampleUsage');" title="自定义 Logger 示例"> 自定义 Logger 示例 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-customloglevels.html#CodeGen');" title="代码生成工具"> 代码生成工具 </a> </li>
</ul> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/scala/index.html');" title="Related Projects"> Related Projects </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/scala/index.html');" title="Log4j-Scala"> Log4j-Scala </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/1.2/');" title="Legacy Sites"> Legacy Sites </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/1.2/');" title="Log4j 1.2-寿命终止"> Log4j 1.2-寿命终止 </a> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/log4j-2.3/');" title="Log4j 2.3-Java 6"> Log4j 2.3-Java 6 </a> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/log4j-2.12.1');" title="Log4j 2.12.1-Java 7"> Log4j 2.12.1-Java 7 </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-api/index.html');" title="Components"> Components </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-api/index.html');" title="API"> API </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-core-index.html');" title="Implementation"> Implementation </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jcl-index.html');" title="公用伐木 bridge"> 公用伐木 bridge </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-1.2-api-index.html');" title="Log4j 1.2 API"> Log4j 1.2 API </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-slf4j-impl-index.html');" title="SLF4J Binding"> SLF4J Binding </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jul-index.html');" title="JUL Adapter"> JUL Adapter </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jpl-index.html');" title="JDK 平台 Logger"> JDK 平台 Logger </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-to-slf4j-index.html');" title="Log4j 2 到 SLF4J 适配器"> Log4j 2 到 SLF4J 适配器 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-flume-ng-index.html');" title="Apache Flume Appender"> Apache Flume Appender </a> </li>
<li> <a href="javascript:window.open('https://logging.apache.org/log4j/2.x/log4j-taglib/index.html');" title="Log4j 标签库"> Log4j 标签库 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-jmx-gui-index.html');" title="Log4j JMX GUI"> Log4j JMX GUI </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-web-index.html');" title="Log4j Web 应用程序支持"> Log4j Web 应用程序支持 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-appserver-index.html');" title="Log4j 应用服务器集成"> Log4j 应用服务器集成 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-couchdb-index.html');" title="Log4j CouchDB 附加器"> Log4j CouchDB 附加器 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-mongodb2-index.html');" title="Log4j MongoDB2 附加器"> Log4j MongoDB2 附加器 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-mongodb3-index.html');" title="Log4j MongoDB3 附加程序"> Log4j MongoDB3 附加程序 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-cassandra-index.html');" title="Log4j Cassandra 附加器"> Log4j Cassandra 附加器 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-iostreams-index.html');" title="Log4j IO 流"> Log4j IO 流 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-liquibase-index.html');" title="Log4j Liquibase 绑定"> Log4j Liquibase 绑定 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-docker-index.html');" title="Log4j Docker 支持"> Log4j Docker 支持 </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/log4j-spring-cloud-config-log4j-spring-cloud-config-client-index.html');" title="Log4j Spring Cloud ConfigClient 端"> Log4j Spring Cloud ConfigClient 端 </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/dependency-convergence.html');" title="Project Information"> Project Information </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/dependency-convergence.html');" title="Dependency Convergence"> Dependency Convergence </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/dependency-management.html');" title="Dependency Management"> Dependency Management </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/team-list.html');" title="Project Team"> Project Team </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/mail-lists.html');" title="Mailing Lists"> Mailing Lists </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/issue-tracking.html');" title="Issue Tracking"> Issue Tracking </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/license.html');" title="Project License"> Project License </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/source-repository.html');" title="Source Repository"> Source Repository </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/project-summary.html');" title="Project Summary"> Project Summary </a> </li>
</ul> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/changes-report.html');" title="Project Reports"> Project Reports </a>
<ul class="articles">
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/changes-report.html');" title="Changes Report"> Changes Report </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/jira-report.html');" title="JIRA Report"> JIRA Report </a> </li>
<li> <a href="javascript:window.open('https://www.docs4dev.com/docs/zh/log4j2/2.x/all/rat-report.html');" title="RAT Report"> RAT Report </a> </li>
</ul> </li>
</ul></div>
</div>
</section>
<div class="right-sidebar">
<div class="affix"><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6108808167664152" data-ad-slot="3102929424" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
</div>
</div>
<div class="ft">
<a href="#toolbar-title" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a>
<footer class="footer">
<div class="footer__container--normal">
<img alt="扫码关注公众号" title="扫码关注公众号" src="static/picture/qr-code.png" width="170" height="170">
<div class="footer__description--normal">
<p class="paragraph footer__author--normal">Docs4dev<sup class="super">&#xAE;</sup>
</p>
<p class="paragraph footer__quote&#45;&#45;normal">
如果你在使用过程中遇到任何问题，可以在 <a href="javascript:window.open('https://github.com/docs4dev/docs4dev-issues');" target="_blank" rel="noopener noreferrer">这里<i class="fa fa-external-link"></i></a> 提issue。
</p>
<div class="footer__main--normal">
<p class="paragraph footer__main__paragraph--normal copyright" style="color: #666 !important;">
<a href="javascript:window.open('https://beian.miit.gov.cn/');">
蜀ICP备14021783号-6
</a>
</p>
<p class="paragraph footer__main__paragraph--normal copyright" style="color: #666 !important;">
Copyright &#xA9; Docs4dev all
right reserved, powered by <a href="index2.html" target="_blank">Docs4dev</a></p>
</div>
</div>
</div>
<div class="box__issues">
</div>
</footer>
</div>
</div>
</div>
</div>
</div>
<script>
  var hasToc = true;
  /*  var downloadable = /!*false*!/ false;
    var editable = /!*false*!/ false;
    var code = /!*"log4j2"*!/ false;
    var version = /!*"2.x"*!/ false;
    var type = /!*"all"*!/ false;
    var lang = /!*"zh"*!/ 'en';
    //edit link
    require(["gitbook", "jQuery"], function (gitbook, $) {
      gitbook.events.bind('start', function (e, config) {
        // Add edit toolbar to left
        var chapterId = /!*17209*!/ 0;
        if (downloadable) {
          gitbook.toolbar.createButton({
            icon: 'fa fa-download',
            text: '下载',
            onClick: function () {
              window.open('/download?code=' + code + '&version=' + version + '&type=' + type + '&lang=' + lang);
            }
          });
        }
        if (editable) {
          gitbook.toolbar.createButton({
            icon: 'fa fa-edit',
            text: '编辑此页',
            onClick: function () {
              window.open('/docs/edit?chapterId=' + chapterId + '&lang=' + lang);
            }
          });
        }
      });
    });*/
</script>
<script>
    var code = "log4j2";
    var lang = "zh";
  </script>

<script src="static/js/autocomplete-js.js"></script>
<script src="static/js/app.min.js"></script>
<script src="static/js/search.min.js"></script>
</body>
</html>
